gdk/wayland: Assign logical pointer to touchpad gesture events
authorCarlos Garnacho <carlosg@gnome.org>
Wed, 24 Feb 2021 23:47:09 +0000 (00:47 +0100)
committerCarlos Garnacho <carlosg@gnome.org>
Thu, 25 Feb 2021 00:08:07 +0000 (01:08 +0100)
These events don't make sense on physical devices (for starters, they
are relative to the logical pointer position). Use this device for
those events, also happens to be what the upper parts expect of them.

gdk/wayland/gdkdevice-wayland.c

index 947302c219de3027f6d7e497af2d2a57a772f403..469222423318f4c3ee6c8f550ca0cc3dcdf5c2f6 100644 (file)
@@ -2536,7 +2536,7 @@ emit_gesture_swipe_event (GdkWaylandSeat          *seat,
   seat->pointer_info.time = _time;
 
   event = gdk_touchpad_event_new_swipe (seat->pointer_info.focus,
-                                        seat->pointer,
+                                        seat->logical_pointer,
                                         _time,
                                         device_get_modifiers (seat->logical_pointer),
                                         phase,
@@ -2632,7 +2632,7 @@ emit_gesture_pinch_event (GdkWaylandSeat          *seat,
   seat->pointer_info.time = _time;
 
   event = gdk_touchpad_event_new_pinch (seat->pointer_info.focus,
-                                        seat->pointer,
+                                        seat->logical_pointer,
                                         _time,
                                         device_get_modifiers (seat->logical_pointer),
                                         phase,